Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iss: 1873 - Fix frame not being drawn on the timeline #1875

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MrStevns
Copy link
Member

@MrStevns MrStevns commented Aug 25, 2024

The reason for this is that while we keep a list of selected keyframes to move and paint on the timeline, a keyframe also has its own "isSelected" state. This state is backed up through undo/redo operations while the layer::getSelectedFrames is not.
We use the isSelected state to ignore selected frames in the TimeLineCells::paintFrames while we use Layer::getSelectedFrames() to paint the selected frames.

This means that we can get into a situation where the frame is neither painted as selected nor non selected because of the two different sources of truth.

The solution is to remove one of the sources. As such, I went ahead and removed isSelected from Keyframe, so there's only one truth. By doing so, said frames can no longer be put in a selected state through undo/redo operations, which I personally think is good. I've inspected a few other applications which does also not keep selections as undo/redo'able state.

To that end my conclusion is that we shouldn't have to do that either.

fixes #1873

The reason for this is that while we keep a list of keyframes to move and paint keyframes on the timeline, a keyframe also has its own "isSelected" state. This state is backed up through undo/redo operations which the layer::getSelectedFrames is not.

The solution is to remove isSelected from Keyframe, as there should only be one truth.
@MrStevns MrStevns added the Bug label Aug 25, 2024
@MrStevns MrStevns changed the title AC-1873 - Fix frame not being drawn on the timeline Iss: 1873 - Fix frame not being drawn on the timeline Sep 23, 2024
@MrStevns MrStevns changed the title Iss: 1873 - Fix frame not being drawn on the timeline iss: 1873 - Fix frame not being drawn on the timeline Sep 23, 2024
@MrStevns MrStevns added this to the 0.7.1 milestone Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Needs Review
Development

Successfully merging this pull request may close these issues.

Timeline frame disappear
1 participant